from django.test import TestCase
from freeze import Freeze
from tasks import update_studio_appset_with_celery,auto_deploy_with_celery
from models import Studio
from django.http import HttpResponse
from app_info import update_studio_appset,update_app


def test_studio_appse_celery(request):

    update_studio_appset_with_celery('Big Bear Entertainment')
    return HttpResponse('ok')
def test_sss(request):
    send_mail_test()
    # auto_deploy_with_celery()
    # update_studio_appset('Big Bear Entertainment')
    return HttpResponse('ok')

from django.core.mail import send_mail
def send_mail_test():
    send_mail(
        'Subject here',
        'Here is the message.',
        'tools@smalltreemedia.com',
        ['heyulin@smalltreemedia.com'],
        fail_silently=False,
    )    

# Create your tests here.
class Mtest(TestCase):
    # def test_func(self):
        # f = Freeze('App Labs')
        # f.run()
        # p=PTS()
        # p.get_studios()
    
    def test_mm(self):
        update_app(sku='CD21853',studio_name='App Labs')